package easyexcel.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.core.io.ClassPathResource;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.net.InetAddress;
import java.net.URL;
import java.net.UnknownHostException;
import java.util.Properties;

/**
 * @description:
 * @author: jichao
 * @date: 2021/5/18 15:05
 */
@RestController
@RequestMapping("/api/apk")
public class downloadController {
    public static void main(String[] args) throws IOException {
        new downloadController().a();
    }

    public void a() throws IOException {
        InputStream inputStream = this.getClass().getClassLoader().getResourceAsStream("templates/drug-platform.apk");
        Properties p = new Properties();
        try {
            p.load(inputStream);
        } catch (IOException e1) {
            e1.printStackTrace();
        }
        System.out.println("ip:"+p.getProperty("ip")+",port:"+p.getProperty("port"));

    }

}
